﻿namespace GuiaTest
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Guia.Core;
    using Guia.Elements;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using WpfTestApplication;

    /// <summary>
    /// Summary description for WindowModal Test.
    /// </summary>
    [TestClass]
    public class WindowModalTest : AbstractWindowTest
    {
        protected override Type TestWindowType()
        {
            return typeof(WindowModalTestWindow);
        }

        protected override string TestWindowName()
        {
            return "WindowModalTestWindow";
        }

        [TestMethod]
        public void TestMultipleOpenDialogs()
        {
            // Dialog stays open
            window.Get<Button>("btnOpenFile").Invoke();
            Delay.ForSeconds(0.5);
            Assert.IsTrue(true);
#if !UseApplication
            this.window.Stop(true);
#endif
        }

        [TestMethod]
        public void TestMessageBox()
        {
            // Dialog stays open
            window.Get<Button>("btnMsgBox").Invoke();
            Delay.ForSeconds(0.5);
            Assert.IsTrue(true);
#if !UseApplication
            this.window.Stop(true);
#endif
        }
    }
}
